import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:'home',
    component:() => import('../views/once/Index.vue'),
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/amin/Login.vue'),
  },
  {
    path: '/checkout',
    name: 'checkout',
    component: () => import('../views/amin/Checkout.vue'),
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/amin/Cart.vue'),
  },
  {
    path: '/zhaoshang',
    component: () => import('../views/once/zhaoshang.vue')
  },
  {
    path: '/about',
    component: () => import('../views/once/About.vue')
  },
  {
    path: '/product',
    component: () => import('../views/once/Product.vue')
  },
  {
    path: '/news',
    component: () => import('../views/amin/News.vue')
  },
  {
    path: '/mark',
    component: () => import('../views/amin/Mark.vue')
  },
  {
    path: '/denglu',
    component: () => import('../views/amin/Yibiao.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
